package com.jy.api.service;

import com.jy.api.controller.admin.params.InventoryFlowRequest;
import com.jy.api.domain.Order;
import com.jy.api.domain.StockChangeTransaction;
import com.jy.api.domain.StockLevel;
import com.jy.api.signUpReq.stock.BarAssembleReq;
import com.jy.api.signUpReq.stock.InventoryInReq;
import com.jy.api.signUpReq.stock.StockBarReq;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created by lihu on 2018/2/5.
 */
public interface StockTransactionService {


    /**
     * 退单入库
     *
     * @param order
     */
    void refundStockIn(Order order) throws Exception;


    /**
     * 仓库变动
     */
    void flows(List<InventoryFlowRequest> requests) throws Exception;

    /**
     * 获取剩余数量
     *
     * @param skuId 商品ID
     * @return 剩余数量
     */
    int surplus(String storeId, String skuId, int type, StockLevel stockLevel);

}
